package iammry.com.activity;

import android.widget.TextView;

import com.lidroid.xutils.view.annotation.ViewInject;

import java.io.InputStream;

import iammry.com.R;
import iammry.com.base.BaseActivity;

/**
 * Created by kim
 * on 2016/11/18 0018.
 * des 用户说明
 */

public class UseragreementActivity extends BaseActivity {
    @ViewInject(R.id.tv_tittle)
    private TextView tv_tittle;
  @ViewInject(R.id.tv_content)
    private TextView tv_content;

    @Override
    protected void initView()
    {
        setLayout(this,R.layout.useragreementactivity_layout);

        tv_tittle.setText("用户协议");

        try{
            InputStream in = getAssets().open("useragreement.txt");
            //获得AssetManger 对象, 调用其open 方法取得  对应的inputStream对象
          int size = in.available();//取得数据流的数据大小
            byte[] buffer= new byte[size];
            in.read(buffer);
            in.close();
            String txt =new  String (buffer);
            tv_content.setText(txt);
        }catch(Exception e ){
          //  Log.e("Assert",e);
        }

    }
}
